3.1.3 \(\int \frac {\sin ^4(x)}{a-a \cos ^2(x)} \, dx\) [3]

Optimal. Leaf size=20 \[ \frac {x}{2 a}-\frac {\cos (x) \sin (x)}{2 a} \]

[Out]

1/2*x/a-1/2*cos(x)*sin(x)/a

________________________________________________________________________________________

Rubi [A]
time = 0.03, antiderivative size = 20, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, integrand size = 16, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.188, Rules used = {3254, 2715, 8} \begin {gather*} \frac {x}{2 a}-\frac {\sin (x) \cos (x)}{2 a} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[Sin[x]^4/(a - a*Cos[x]^2),x]

[Out]

x/(2*a) - (Cos[x]*Sin[x])/(2*a)

Rule 8

Int[a_, x_Symbol] :> Simp[a*x, x] /; FreeQ[a, x]

Rule 2715

Int[((b_.)*sin[(c_.) + (d_.)*(x_)])^(n_), x_Symbol] :> Simp[(-b)*Cos[c + d*x]*((b*Sin[c + d*x])^(n - 1)/(d*n))
, x] + Dist[b^2*((n - 1)/n), Int[(b*Sin[c + d*x])^(n - 2), x], x] /; FreeQ[{b, c, d}, x] && GtQ[n, 1] && Integ
erQ[2*n]

Rule 3254

Int[(u_.)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]^2)^(p_), x_Symbol] :> Dist[a^p, Int[ActivateTrig[u*cos[e + f*x
]^(2*p)], x], x] /; FreeQ[{a, b, e, f, p}, x] && EqQ[a + b, 0] && IntegerQ[p]

Rubi steps

\begin {align*} \int \frac {\sin ^4(x)}{a-a \cos ^2(x)} \, dx &=\frac {\int \sin ^2(x) \, dx}{a}\\ &=-\frac {\cos (x) \sin (x)}{2 a}+\frac {\int 1 \, dx}{2 a}\\ &=\frac {x}{2 a}-\frac {\cos (x) \sin (x)}{2 a}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.00, size = 18, normalized size = 0.90 \begin {gather*} \frac {\frac {x}{2}-\frac {1}{4} \sin (2 x)}{a} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[Sin[x]^4/(a - a*Cos[x]^2),x]

[Out]

(x/2 - Sin[2*x]/4)/a

________________________________________________________________________________________

Maple [A]
time = 0.06, size = 23, normalized size = 1.15

method result size
risch \(\frac {x}{2 a}-\frac {\sin \left (2 x \right )}{4 a}\) \(17\)
default \(\frac {-\frac {\tan \left (x \right )}{2 \left (1+\tan ^{2}\left (x \right )\right )}+\frac {\arctan \left (\tan \left (x \right )\right )}{2}}{a}\) \(23\)
norman \(\frac {\frac {\tan ^{6}\left (\frac {x}{2}\right )}{a}+\frac {\tan ^{8}\left (\frac {x}{2}\right )}{a}-\frac {\tan ^{2}\left (\frac {x}{2}\right )}{a}-\frac {\tan ^{4}\left (\frac {x}{2}\right )}{a}+\frac {x \tan \left (\frac {x}{2}\right )}{2 a}+\frac {2 x \left (\tan ^{3}\left (\frac {x}{2}\right )\right )}{a}+\frac {3 x \left (\tan ^{5}\left (\frac {x}{2}\right )\right )}{a}+\frac {2 x \left (\tan ^{7}\left (\frac {x}{2}\right )\right )}{a}+\frac {x \left (\tan ^{9}\left (\frac {x}{2}\right )\right )}{2 a}}{\left (1+\tan ^{2}\left (\frac {x}{2}\right )\right )^{4} \tan \left (\frac {x}{2}\right )}\) \(119\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sin(x)^4/(a-a*cos(x)^2),x,method=_RETURNVERBOSE)

[Out]

1/a*(-1/2*tan(x)/(tan(x)^2+1)+1/2*arctan(tan(x)))

________________________________________________________________________________________

Maxima [A]
time = 0.48, size = 21, normalized size = 1.05 \begin {gather*} \frac {x}{2 \, a} - \frac {\tan \left (x\right )}{2 \, {\left (a \tan \left (x\right )^{2} + a\right )}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sin(x)^4/(a-a*cos(x)^2),x, algorithm="maxima")

[Out]

1/2*x/a - 1/2*tan(x)/(a*tan(x)^2 + a)

________________________________________________________________________________________

Fricas [A]
time = 0.38, size = 14, normalized size = 0.70 \begin {gather*} -\frac {\cos \left (x\right ) \sin \left (x\right ) - x}{2 \, a} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sin(x)^4/(a-a*cos(x)^2),x, algorithm="fricas")

[Out]

-1/2*(cos(x)*sin(x) - x)/a

________________________________________________________________________________________

Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 153 vs. \(2 (14) = 28\).
time = 0.81, size = 153, normalized size = 7.65 \begin {gather*} \frac {x \tan ^{4}{\left (\frac {x}{2} \right )}}{2 a \tan ^{4}{\left (\frac {x}{2} \right )} + 4 a \tan ^{2}{\left (\frac {x}{2} \right )} + 2 a} + \frac {2 x \tan ^{2}{\left (\frac {x}{2} \right )}}{2 a \tan ^{4}{\left (\frac {x}{2} \right )} + 4 a \tan ^{2}{\left (\frac {x}{2} \right )} + 2 a} + \frac {x}{2 a \tan ^{4}{\left (\frac {x}{2} \right )} + 4 a \tan ^{2}{\left (\frac {x}{2} \right )} + 2 a} + \frac {2 \tan ^{3}{\left (\frac {x}{2} \right )}}{2 a \tan ^{4}{\left (\frac {x}{2} \right )} + 4 a \tan ^{2}{\left (\frac {x}{2} \right )} + 2 a} - \frac {2 \tan {\left (\frac {x}{2} \right )}}{2 a \tan ^{4}{\left (\frac {x}{2} \right )} + 4 a \tan ^{2}{\left (\frac {x}{2} \right )} + 2 a} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sin(x)**4/(a-a*cos(x)**2),x)

[Out]

x*tan(x/2)**4/(2*a*tan(x/2)**4 + 4*a*tan(x/2)**2 + 2*a) + 2*x*tan(x/2)**2/(2*a*tan(x/2)**4 + 4*a*tan(x/2)**2 +
 2*a) + x/(2*a*tan(x/2)**4 + 4*a*tan(x/2)**2 + 2*a) + 2*tan(x/2)**3/(2*a*tan(x/2)**4 + 4*a*tan(x/2)**2 + 2*a)
- 2*tan(x/2)/(2*a*tan(x/2)**4 + 4*a*tan(x/2)**2 + 2*a)

________________________________________________________________________________________

Giac [A]
time = 0.43, size = 22, normalized size = 1.10 \begin {gather*} \frac {x}{2 \, a} - \frac {\tan \left (x\right )}{2 \, {\left (\tan \left (x\right )^{2} + 1\right )} a} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sin(x)^4/(a-a*cos(x)^2),x, algorithm="giac")

[Out]

1/2*x/a - 1/2*tan(x)/((tan(x)^2 + 1)*a)

________________________________________________________________________________________

Mupad [B]
time = 2.04, size = 15, normalized size = 0.75 \begin {gather*} \frac {2\,x-\sin \left (2\,x\right )}{4\,a} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sin(x)^4/(a - a*cos(x)^2),x)

[Out]

(2*x - sin(2*x))/(4*a)

________________________________________________________________________________________